<template>
 <div>
     <h2>详情页</h2>
     <img :src="baseUrl+img" alt />
     {{name}}==={{price}}
 </div>
</template>

<script>
 export default {
   data () {
     return {
         baseUrl:'http://127.0.0.1:8000',
         name:'',
         price:'',
         img:''
     }
   },
   mounted() {
       let id=this.$route.query.id;
       this.axios({
           url:'http://127.0.0.1:8000/app01/detail_goods/',
           method:'get',
           params:{id:id}
       }).then(res=>{
           this.name=res.data.data.name;
           this.price=res.data.data.price;
           this.img=res.data.data.img;
       })
   }
 }
</script>

<style>

 
</style>
